Description

A Tag binding simply binds a property directly to a Tag.

Video recorded using: Ignition 8.1

Transcript

(open in window)

[00:00] In this lesson, I'll demonstrate how to link vision components to tags in my system. In order to do this, I'll use tag bindings. If you look at my tag browser, you can see that I already have some tags and I'd like to display one in my project. For example, Randomdouble1. First, I'll add a cylindrical tank component to my vision window. The vision property editor is where I can manage all the different properties that control the appearance and behavior of the component. I can bind any one of these properties to one of these tags in the tag browser. If I want to bind a tag to the value property, I can click this little chain link icon to the right of the property. I'll bind this to a tag, and I can choose from any of the tags in my system. So I'll drill into my simulator folder, into random, and here's my Randomdouble1 tag. I'll select it and then hit okay. Now the value property is bound to the tag, and any time the tag changes, the property changes and the component updates.

[01:02] You can set up tag bindings on any property of any component. So you can set them up on values of LED displays meters, or you can bind to text properties on buttons and labels as well, whatever you want. Once a tag binding is set up, there are a couple visual indicators to let you know. First, the property name will be bolded in the property editor, and if you look in the project browser, you'll see that there's a tag icon next to the component. It's useful to know that tag bindings work by having a specific tag path that points to your selected tag. This tag path is just a string that contains the tag provider, any number of folders the tag may be nested in, and then the name of the tag. If you were to change any part of this tag path, your binding will no longer work. If I rename this tag real quick, you'll see an overlay appear on the component because the binding broke. If I run diagnostics on the component, it lets me know that the tag at the given path can't be found. Then if I change the name back, the binding will start working again, and the overlay disappears.

[02:06] Because of this it's best to start setting up bindings after your tag structure has been set up.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.